unit LoginMain;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, dx_vgcore, GlobalVars;

type
  TLoginForm = class(TForm)
    vxScene1: TvxScene;
    Root1: TvxBackground;
    edLogin: TvxRoundTextBox;
    Label1: TvxLabel;
    Label2: TvxLabel;
    edPass: TvxRoundTextBox;
    btnLogin: TvxRoundButton;
    btnCansel: TvxRoundButton;
    procedure btnCanselClick(Sender: TObject);
    procedure btnLoginClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  LoginForm: TLoginForm;

implementation

{$R *.dfm}

procedure TLoginForm.btnCanselClick(Sender: TObject);
begin
  Self.Close;
end;

procedure TLoginForm.btnLoginClick(Sender: TObject);
begin
  if Player.Login(edLogin.Text,edPass.Text) then
  begin
    ShowMessage('Login Ok: Secret key='+Player.SecretKey);
    Client.SecretKey:=Player.SecretKey;
    Self.Close;
  end;
end;

end.
